fo = open("xiaofei.csv","r")
info = input("请输入省份和要查找的项目:")
ind = info.split("，")
ls = []
head = []
index = 0
for line in fo:
    line = line.replace("\n","")
    if index==0:
        head = line.split(",")
        index += 1
        
    ls = line.split(",")
    if ind[0] == ls[0]:
        print("您输入的城市是：{}".format(ls[0]))
        for x in range(1,len(ind)):
            i = 0
            for y in head:
                if y == ind[x]:
                    print("{}消费金额：{}".format(ind[x],ls[i]))
                else:
                    i += 1
fo.close()
